package com.clip.entity;

// default package

/**
 * User entity. @author MyEclipse Persistence Tools
 */

public class User implements Comparable, java.io.Serializable {
	/**
	 * 普通用户 usertype 1
	 * 商家 usertype 2：job ：简介，blog:官网，bgurl：背景图片地址，userstatus：用户状态
	 * isouter: 0 站内用户 1... 站外用户 	1：暂时表示新浪用户
	 * 
	 * 未注册时，验证码保存在userstatus中.
	 * */
	// Fields

	private int id;
	private String email;
	private String name;
	private String pwd;
	private Integer sex;
	private Long birth;
	private String qq;
	private String msn;
	private Long mobile;
	private String living;
	private String job;
	private String edu;
	private String blog;
	private Integer status;
	private Long regtime;
	private Integer usertype;
	private String bgurl;
	private String userstatus;
	private int isouter;
	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String email, String name, String pwd, Integer status) {
		this.email = email;
		this.name = name;
		this.pwd = pwd;
		this.status = status;
	}

	/** full constructor */
	public User(String email, String name, String pwd, Integer sex, Long birth, String qq, String msn, Long mobile, Integer status) {
		this.email = email;
		this.name = name;
		this.sex = sex;
		this.pwd = pwd;
		this.birth = birth;
		this.qq = qq;
		this.msn = msn;
		this.mobile = mobile;
		this.status = status;
	}

	// Property accessors

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPwd() {
		return this.pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public Long getBirth() {
		return this.birth;
	}

	public void setBirth(Long birth) {
		this.birth = birth;
	}

	public String getQq() {
		return this.qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getMsn() {
		return this.msn;
	}

	public void setMsn(String msn) {
		this.msn = msn;
	}

	public Long getMobile() {
		return this.mobile;
	}

	public void setMobile(Long mobile) {
		this.mobile = mobile;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public String getLiving() {
		return living;
	}

	public void setLiving(String living) {
		this.living = living;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getEdu() {
		return edu;
	}

	public void setEdu(String edu) {
		this.edu = edu;
	}

	public String getBlog() {
		return blog;
	}

	public void setBlog(String blog) {
		this.blog = blog;
	}

	public Long getRegtime() {
		return regtime;
	}

	public void setRegtime(Long regtime) {
		this.regtime = regtime;
	}	
	
	public Integer getUsertype() {
		return usertype;
	}

	public void setUsertype(Integer usertype) {
		this.usertype = usertype;
	}

	public String getBgurl() {
		return bgurl;
	}

	public void setBgurl(String bgurl) {
		this.bgurl = bgurl;
	}

	/**
	 * @return 未注册时的验证码
	 */
	public String getUserstatus() {
		return userstatus;
	}

	/**
	 * @param userstatus	未注册时的验证码
	 */
	public void setUserstatus(String userstatus) {
		this.userstatus = userstatus;
	}
	
	public int getIsouter() {
		return isouter;
	}

	public void setIsouter(int isouter) {
		this.isouter = isouter;
	}

	@Override
	public int compareTo(Object o) {
		if(o instanceof User){
			User temp=(User) o;
			return this.name.compareTo(temp.getName());
		}else
			return 0;
	}
	
}